import sys,os,pickle,numpy as np
sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
import requests,time,json,glob,re
from protocol.decorators import edp_service, instant

@edp_service
class Calculator:
    name = "py_calculator"
    desc = "Python Calculator"
    category = "test"
    tasks = [
        "list_add_1: List<Int>->List<Int>",
        "int_mul_2: Int->Int"
    ]
    @instant
    def list_add_1(self, inputs):
        return [x + 1 for x in inputs]
    @instant
    def int_mul_2(self, inputs):
        return inputs * 2

Calculator.app.run(port=5080, debug=True)